<if condition="empty($cartList)">
    <p style="text-align:center"><a href="/"><img src="__STATIC__/images/null_cart2.jpg" style="margin:30px 0 50px;"  /></a></p>
    <script>
        $(".sc-acti-list,.sc-pro-list").hide();
    </script>
</if>

<div class="sc-pro-list">
    <table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tr class="ba-co-danhui">
            <th class="pa-le-9" align="center" valign="middle">&nbsp;&nbsp;</th>
            <th align="left" valign="middle" colspan="2">&nbsp;&nbsp;商品名稱</th>
            <th align="center" valign="middle">單價（元）</th>
            <if condition="($user[discount] neq 1) and ($user[discount] neq null)">
                <th align="center" valign="middle">会员折扣价</th>
            </if>
            <th align="center" valign="middle">購買數量</th>
            <th align="center" valign="middle">應付（元）</th>
            <th align="center" valign="middle">操作</th>
        </tr>

        <if condition="$promname">
            <tr style="border-bottom: 1px solid #ECECEC;">
                <!--<td  colspan="<if condition="($user[discount] neq 1) and ($user[discount] neq null)">8<else/>7</if>" style="padding:10px 0;">-->
                <!--<b class="cart_tag">选择优惠活动</b>-->


                <td colspan="<if condition="($user[discount] neq 1) and ($user[discount] neq null)">8<else/>7</if>" style="padding:10px 0;">
        <b class="cart_tag">优惠</b>
        <span class="content_tag">
          <select name="hd_id" id="hd_id" onchange="ajax_cart_list()" style="margin-right:10px;">
          <foreach name="promname" item="v1" key="k1" >
              <option <if condition="$hd_id eq $v1[id]"> selected="selected" </if> value="{$v1[id]}">{$v1[name]}</option>
          </foreach>
          </select><if condition="$total_price.yh_total neq 0">
          {$total_price.yh_str}
            <!--活动商品已购满{$total_price.selnum}件（<em>已减¥{$total_price.yh_total}</em>)-->
      </if></span>

        <if condition="$total_price.yh_total neq 0"> <div class="right_price">¥ {$total_price.total_header_fee}<br ><em>减：¥ {$total_price.yh_total}</em></div></if>
        </td>


        </tr>
        </if>

        <foreach name="cartList" item="v" key="k" >
            <tr style="border-bottom: 1px solid #ECECEC;">
                <td class="pa-le-9" style="border-right:0" align="center" valign="middle">
                    <input type="checkbox"  name="cart_select[{$v.id}]" <if condition="$v[selected] eq 1" >checked="checked"</if>  value="1" onclick="ajax_cart_list();" <if condition="$v.store_count eq '0'">disabled="disabled" </if>  />
                </td>
                <td style="border-left:0px;;border-right:0px" class="pa-to-20 pa-bo-20 bo-ri-0" width="80px" align="center" valign="top" valign="middle">
                    <a class="gwc-wp-list di-bl" href="{:U('Home/Goods/goodsInfo',array('id'=>$v[goods_id]))}">
                        <img src="{$v.goods_id|goods_thum_images=100,133}" style="margin-left:30px;">
                    </a>
                </td>
                <td style="border-left:0px; border-right:0px; padding-left:18px;"  class="pa-to-20 wi516"align="left"  valign="top" valign="middle">
                    <p class="gwc-ys-pp">
                        <a href="{:U('Home/Goods/goodsInfo',array('id'=>$v[goods_id]))}" style="vertical-align:middle">{$v.goods_name}</a>
                        <!--团购--><if condition="$v[activity_type] eq 2"><img  width="80" height="60" src="/Public/images/groupby2.jpg" style="vertical-align:middle"></if>
                        <!--抢购--><if condition="$v[activity_type] eq 1"><img  width="40" height="40" src="/Public/images/qianggou2.jpg" style="vertical-align:middle"></if>
                    </p>
                    <p class="ggwc-ys-hs">{$v.spec_key_name}</p>
                    <if condition="$v.store_count eq '0'">
                        <p style="color:#C80000;">商品缺货中</p>
                    </if>

                </td>
                <td style="border-left:0px" align="center" valign="middle"><span>￥{$v.goods_price}</span></td>
                <if condition="($user[discount] neq 1) and ($user[discount] neq null)">
                    <td style="border-left:0px" align="center" valign="middle"><span>￥{$v.member_goods_price}</span></td>
                </if>
                <td align="center" valign="middle">
                    <div class="sc-stock-area">
                        <div class="stock-area">
                            <a onClick="switch_num(-1,{$v.id},{$v.store_count});" title="减">-</a>
                            <input class="wi43 fl" type="text" value="{$v.goods_num}" name="goods_num[{$v.id}]" id="goods_num[{$v.id}]" readonly />
                            <a onClick="switch_num(1,{$v.id},{$v.store_count});" title="加">+</a>
                        </div>
                    </div>
                </td>
                <td align="center" valign="middle" style="font-weight: bold;">￥{$v.goods_fee}</td>
                <td align="center" valign="middle"><a  class="gwc-gb" href="javascript:void(0);" onclick="ajax_del_cart({$v.id},'{$v.goods_name}');">刪除</a></td>
            </tr>
        </foreach>


    </table>
</div>
<div class="sc-total-list ma-to-20 sc-pro-list">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td class="pa-le-9 gwx-xm-dwz" style="height: auto;">
                &nbsp;<input type="checkbox" name="select_all" id="select_all" <if condition="$select_all eq 1" >checked="checked"</if> onchange="check_all();" value="1"/>
                <label for="">全選</label>
                <a href="javascript:void(0);" onclick="del_cart_more();">刪除選中商品</a>
            </td>
            <td style="height: auto;"></td>

            <td  width="190" align="right" style="height: auto;">已选择 <em style="font-size: 12px; color:#D40000;">{$total_price.selnum}</em> 件商品, 總价：</td>
            <td  width="69" align="left" style="height: auto;"><em style=" font-weight:bold;">￥{$total_price.total_fee}&nbsp;</em></td>

            <!--
            <td width="190" align="right">總計金額：</td>
            <td width="69" align="right">￥{$total_price.total_fee }</td>
            <td>&nbsp;</td> -->
        </tr>
        <if condition="$total_price.yh_total neq 0">
            <tr>
                <td class="pa-le-9 gwx-xm-dwz">

                </td>
                <td></td>

                <td  width="190" align="right" style="height: auto;">已节省：</td>
                <td  width="69" align="left" style="height: auto;"><em style="font-size: 12px; color:#5F5F5F;">-￥{$total_price.yh_total}&nbsp;</em></td>

                <!--
                <td width="190" align="right">總計金額：</td>
                <td width="69" align="right">￥{$total_price.total_fee }</td>
                <td>&nbsp;</td> -->
            </tr></if>

        <tr style="display:none;">
            <td>&nbsp;</td>
            <td id="bo-to-dedede" width="190" align="right">產品金額總計（不含運費）：</td>
            <td id="bo-to-dedede" width="69" align="right"><em>￥{$total_price.total_fee }</em></td>
            <td>&nbsp;</td>
        </tr>
    </table>
</div>